#include "Button.h"
#include <stdio.h>


int main()
{
	unsigned char value = 0x00;
	BitPointer b = BitPointer(&value, 0);
	unsigned char array[7][6]= { 
				 {0,0,0,0,0,0},
				 {1,0,0,0,0,0},
				 {1,1,0,0,0,0},
				 {1,1,1,0,0,0},
				 {1,1,1,1,0,0},
				 {1,1,1,1,1,0},
				 {1,1,1,1,1,1}
			      };
	Counter<unsigned char> counter = Counter<unsigned char>(0, 5);
	Button button = Button(counter, b, 1);
	for(int i = 0; i < 7; i++)
	{
		printf("doing the test at i=%d\n", i);
		for(int j = 0; j < 6; j++)
		{
			b.setBit(array[i][j]);
			button.run();
		}
		printf("pressed==%d\n", button.isPressed());
		button.reset();
	}
	
	printf("Finished the first test\n");
}
